<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    index work
<script type="text/javascript">
    ws = new WebSocket("ws://workman_tp5.com:2346");
    ws.onopen = function() {
        ws.send('2');
    };
    ws.onmessage = function(e) {
        alert("收到服务端的消息：" + e.data);
    };
</script>
</body>
</html>